package com.xf.game;

import android.util.Log;

import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Button;
import com.badlogic.gdx.utils.viewport.FillViewport;
import com.badlogic.gdx.utils.viewport.Viewport;

import javax.microedition.khronos.opengles.GL10;

public class FirstGame implements ApplicationListener {
    private Stage stage;
    private FirstActor firstActor;
    private Button button;
    @Override
    public void create() {
        stage=new Stage();
        FillViewport fillViewport = new FillViewport(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
        stage = new Stage(fillViewport);
        firstActor = new FirstActor();
        button = new Button();
        button.setName("行动");
        stage.addActor(firstActor);
        stage.addActor(button);
        Gdx.input.setInputProcessor(stage);
    }
    @Override
    public void dispose() {
        stage.dispose();
    }
    @Override
    public void pause() {
// TODO Auto-generated method stub
    }
    @Override
    public void render() {
        Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
        stage.act(Gdx.graphics.getDeltaTime());
        stage.draw();
    }
    @Override
    public void resize(int width, int height) {
// TODO Auto-generated method stub
    }
    @Override
    public void resume() {
// TODO Auto-generated method stub
    }
}